<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of UserImageModel
 *
 * @author Sorasak Siangsanan
 */
class UserImageModel extends CI_Model {

    public function getUserImageProfile($user_id) {
        $this->db->where('user_id', $user_id);
        $this->db->where('is_profile', 1);
        $this->db->order_by("id", "desc"); 
        $query = $this->db->get('user_image', 1, 0);
        log_message('info', get_class() . " -------- SQL : " . $this->db->last_query());
        return $query->row();
    }

}
